package com.aliyun.messagemgt.dto.vo.weixin;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * @Author: Xiaohang Lv
 * @Date: 2019/5/15 16:33
 */
public class WeixinTextSendModelVO extends WeixinSendModelVO {

    private Text text;

    public WeixinTextSendModelVO() {
        super.setMsgtype("text");
        this.text = new Text();
    }

    public Text getText() {
        return text;
    }

    public WeixinTextSendModelVO setText(Text text) {
        this.text = text;
        return this;
    }

    public WeixinTextSendModelVO setContent(String content) {
        text.content = content;
        return this;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    static class Text {
        /**
         * 消息内容，最长不超过2048个字节
         */
        private String content;

        public String getContent() {
            return content;
        }

        public Text setContent(String content) {
            this.content = content;
            return this;
        }

        @Override
        public String toString() {
            return ToStringBuilder.reflectionToString(this);
        }
    }
}
